package com.dly.hope.model.ro;

import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author linyu.dai
 * @project myserve
 * @description 注册Ro
 * @creat 2022/8/28 10:37:01
 */
@Data
@ApiModel
public class RegisterRo extends BaseRo{

    /**
     * 账号
     */
    @NotBlank(groups = {WhenCheckLoginCode.class}, message = "账号不能为空")
    private String account;

    /**
     * 密码
     */
    @NotBlank(groups = {WhenCheckLoginCode.class, WhenModifyPassword.class}, message = "密码不能为空")
    private String password;

    /**
     * 验证码
     */
    @NotBlank(groups = {WhenCheckLoginCode.class, WhenModifyPassword.class}, message = "验证码不能为空")
    private String ver_code;

    /**
     * 邮箱
     */
    @Pattern(groups = {WhenSendCode.class, WhenCheckLoginCode.class, WhenModifyPassword.class}, regexp =  "[a-zA-Z0-9_]+@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9]+)+", message = "邮箱格式不正确")
    @NotBlank(groups = {WhenCheckLoginCode.class, WhenModifyPassword.class}, message = "邮箱不能为空")
    private String Email;

    @NotBlank(groups = {WhenCheckLoginCode.class}, message = "账号名不能为空")
    private String account_name;
}
